﻿using System.Web.Mvc;
using EPiServer.Core;

namespace SocialPack.Extensions
{
    public static class DisqusExtensions
    {
        public static string GetDisqusCommentLink(this PageData page)
        {
            var link = new TagBuilder("a");

            string url = page.LinkURL + "#disqus_thread";

            link.MergeAttribute("href", url);
            link.MergeAttribute("data-disqus-identifier", page.PageGuid.ToString());

            return link.ToString(TagRenderMode.Normal);
        }
    }
}